$(function () {
    //实现功能
    function getUrl(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return decodeURI(r[2]);
        return null;
    }
    function getDetail() {
        $.ajax({
            url:"http://193.112.55.79:9090/api/getmoneyctrlproduct",
            type:"get",
            data:{productid:getUrl(`productId`)},
            success:function(result){
                let data=result.result
                let html=template('detail',{
                    arr:data
                });
                $('.header').html(html);

            }
        })
    }
    
    console.log(getUrl(`productId`))
    getDetail();

})